﻿using GameFramework.Editor.Utility;
using UnityEditor;

namespace GameFramework.Editor
{
    public partial class Menus
    {
        public static class Gameplay
        {
            // ReSharper disable once MemberHidesStaticFromOuterClass
            private const string MenuRoot = Menus.MenuRoot + "/Gameplay";
            
            private const string MenuItemToggle = MenuRoot + "/Use Gameplay Procedure";
            
            private const string ScriptingDefineSymbolGameplay = "USE_GAMEPLAY_PROCEDURE";
            
            [MenuItem(MenuItemToggle, false, 100)]
            public static void Toggle()
            {
                ScriptingDefineSymbolsUtility.Toggle(ScriptingDefineSymbolGameplay);
            }
            
            [MenuItem(MenuItemToggle, true)]
            public static bool ToggleValidate()
            {
                Menu.SetChecked(MenuItemToggle, ScriptingDefineSymbolsUtility.Contains(ScriptingDefineSymbolGameplay));
                return true;
            }
        }
    }
}